package com.putiman.sbv.controller;

import com.putiman.sbv.configuration.CallConfiguration;
import com.putiman.sbv.model.User;
import com.putiman.sbv.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    private UserService userService;
    @Autowired
    private CallConfiguration callConfiguration;

    @GetMapping("/find")
    public User getInfo(Long id){
        System.out.println(callConfiguration.getUrl());
        User user = userService.getById(id);
        return user;
    }
}
